<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>3D 按钮</title>
  <style type="text/css">
      * {
          margin: 0;
          padding: 0;
      }

      .box {
          width: 80px;
          height: 30px;
          perspective: 2200;
          transform-style: preserve-3d;
          margin: 100px auto;
          position: relative;
          cursor: pointer;
          transition: all .5s;
      }

      .box:hover {
          transform: rotateX(-90deg);
      }

      .front, .top {
          position: absolute;
          text-align: center;
          line-height: 30px;
          color: white;
          width: 80px;
          height: 30px;
          font-weight: bold;
      }

      .front {
          background: #747d8c;
          transform: translateZ(15px);
      }

      .top {
          background: #57606f;
          transform: rotateX(90deg) translateZ(15px);
      }
  </style>
</head>
<body>
<div class="box">
  <div class="front">Hello</div>
  <div class="top">BiliBili</div>
</div>
</body>
</html>